Add Async prefix to generated AWS client names#737
Merged
Conversation
Async clients are renamed from `<SdkId>Client` to `Async<SdkId>Client` to match the Python convention. The old name remains as a deprecated alias (via module `__getattr__` + `TYPE_CHECKING` binding) that warns and returns the async client; it will be removed once sync clients land. Also bump codegen to 0.4.0.
SamRemis
previously approved these changes
Jul 9, 2026
SamRemis
left a comment
Contributor
There was a problem hiding this comment.
Looks good; got this generated and running locally.
We could make an allow-list instead so we aren't shipping new clients with deprecated aliases, but as long as we swap this out soon, it's not a big concern.
Contributor
Author
|
Yea, I though of the allow list but got lazy with the decision. Since you also had the same idea, I think it's worth doing. I'll add in the next revision. |
SamRemis
approved these changes
Jul 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Generated AWS clients are async, but they're named
<SdkId>Client(e.g.BedrockRuntimeClient). This PR renames them toAsync<SdkId>Client(e.g.AsyncBedrockRuntimeClient) to match the convention and to free up the unprefixed name for the sync clients we plan to add later.The rename is a breaking change for the clients already published under the old name. To keep existing code working, those clients also emit the old name as a deprecated alias that resolves to the async client and raises a
DeprecationWarning. The alias is temporary and will be removed in a minor bump sometime in the future.Scope
The Async rename applies to all generated AWS clients. The backwards-compat alias is only generated for the clients already published under the unprefixed name in awslabs/aws-sdk-python:
Bedrock Runtime, ConnectHealth, Lex Runtime V2, Polly, QBusiness, SageMaker Runtime HTTP2, Transcribe Streaming
New clients released after this change is merged are created with the Async-prefixed and no alias.
Before
Client Class:
Usage (no warning):
After
The old name stays importable at runtime (with a DeprecationWarning) and resolves for type checkers via the TYPE_CHECKING alias.
Client Class:
Usage:
A newly added service (not in the allowlist) generates just the class, no alias:
Backwards compatibility
Existing customer code using
BedrockRuntimeClientwill continue to work since we're aliasing it toAsyncBedrockRuntimeClient. This will be removed in a future version of the SDK in a minor bump before GA.Testing
Regenerated all 7 aws-sdk-python clients. I verified all clients have the renamed class and only the existing clients get the aliasing logic.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.